package com.ruicar.afs.cloud.bizcommon.cms.feign;

import com.ruicar.afs.cloud.bizcommon.cms.dto.*;
import com.ruicar.afs.cloud.bizcommon.cms.dtoresponse.CmsContractOneInfoDTO;
import com.ruicar.afs.cloud.bizcommon.cms.dtoresponse.CmsQueryContractResponseDTO;
import com.ruicar.afs.cloud.common.core.feign.annotations.AfsFeignClear;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.context.annotation.Description;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.Mapping;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;

/**
 * @author: Lee
 * @date: 2020/5/11 19:39
 * @description:
 */
@FeignClient(name = "Cms-Plan-Change-Feign", url = "${com.greatwall.systems.cms.url}")
public interface CmsPlanChangeFeign {

    @Description("合同取消状态同步cms接口")
    @PostMapping(value = "/contract/get_contract_paging")
    @AfsFeignClear(true)
    CmsResponse<CmsQueryContractResponseDTO> cancelOrClose(@RequestBody CmsCheckRequestDTO dto);


    @Description("还款日变更同步cms接口")
    @GetMapping(value = "/toCms/changeRepayment")
    public CmsResponse changeRepayment(@RequestBody CmsChangeRepaymentRequestDTO dto);
//    @Description("还款日变更同步cms接口")
//    @GetMapping(value = "/contract/ContractClosureToCms")
//    CmsBaseResponseDTO contractClose(@RequestBody CmsContractCloseRequestDTO dto);

    @Description("合同取消状态同步cms接口")
    @PostMapping(value = "/contract/FlatCancelToCMS")
    @AfsFeignClear(true)
    CmsResponse ContractCancel(@RequestBody CmsCancelContractRequestDto dto);

    @Description("身份信息变更同步cms接口")
    @GetMapping(value = "/toCms/changeUserInfoToCms")
    CmsResponse changeCustInfo(@RequestBody CmsChangeCustInfoRequestDTO dto);

    @Description("银行卡信息变更同步cms接口")
    @GetMapping(value = "/toCms/changeBankAccountToCms")
    CmsResponse changeBankAccountToCms(@RequestBody CmsChangeBankCardRequestDTO dto);


    @Description("联系方式变更同步CMS接口")
    @PostMapping(value = "/toCms/changePhoneToCms")
    @AfsFeignClear(true)
    CmsResponse syncToCmsPhoneResult(@RequestBody CmsRelationChangeRequestDTO dto);

    @Description("根据合同号查询客户信息")
    @PostMapping(value = "/toCms/changeAddressToCms")
    @AfsFeignClear(true)
    CmsResponse syncToCmsAddressResult(@RequestBody CmsRelationChangeRequestDTO dto);

    @Description("根据合同号查询客户信息")
    @PostMapping(value = "/baseData/getCustomer")
    @AfsFeignClear(true)
    CmsResponse<CmsContractOneInfoDTO> syncToCmsCustomer(@RequestBody CmsContractDTO dto);
}